using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class log_msgMap : EntityTypeConfiguration<log_msg>
    {
        public log_msgMap()
        {
            // Primary Key
            this.HasKey(t => t.log_id);

            // Properties
            this.Property(t => t.user_id)
                .HasMaxLength(100);

            this.Property(t => t.log_message)
                .HasMaxLength(1000);

            this.Property(t => t.log_comment)
                .HasMaxLength(5000);

            // Table & Column Mappings
            this.ToTable("log_msg");
            this.Property(t => t.log_id).HasColumnName("log_id");
            this.Property(t => t.user_id).HasColumnName("user_id");
            this.Property(t => t.log_time).HasColumnName("log_time");
            this.Property(t => t.log_message).HasColumnName("log_message");
            this.Property(t => t.log_comment).HasColumnName("log_comment");
        }
    }
}
